#ifndef DEV_READER_UHF_H
#define DEV_READER_UHF_H

#include "ae_device.h"
#include "rfidlib_aip_iso18000p6c.h"
#include "invenparams.h"

class CAEDevice_UHF : public CAEDevice
{
private:
    const InvenParams* invenParams=NULL;
public:
    CAEDevice_UHF(InvenParams*& invenParams);
    virtual ~CAEDevice_UHF();

    err_t func_Inventory();
    void AddNewISO18000P6CTag(UINT32& AIPType, UINT32& tagType, UINT32& antID,
                              UINT32& metaFlags,
                              BYTE tagData[], UINT32& datlen,
                              string& writeOper, string& lockOper);

    err_t func_AccessTag_WriteData(CTag &tag, DWORD access_pwd,BYTE mem_type, DWORD mem_addr_word, DWORD mem_num_word, BYTE *data, DWORD dlen);
    err_t func_AccessTag_ReadData(CTag &tag, DWORD access_pwd,BYTE mem_type, DWORD mem_addr_word, DWORD mem_num_word, BYTE *data, DWORD &dlen);
    err_t func_AccessTag_UHF_Kill_Tag(CTag &tag, DWORD accessPwd, DWORD killPwd, BYTE rfu);

private:
    err_t AccessTag_Connect(CTag &tag,RFID_TAG_HANDLE *ht,DWORD accessPwd);
    err_t AccessTag_Disconnect(RFID_HANDLE ht);
};

#endif // DEV_READER_UHF_H
